<%@ page language="java" contentType="text/html; charset=UTF-8"    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"    uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<sec:authentication property="principal" var="currentPrincipal" scope="page" />

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ms-theme-blue">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <%@ include file="/WEB-INF/include/submenu.jsp"%>
  
  <div class="container-fluid ms-container has-ms-sidemenu">
    
    <ol class="ms-breadcrumb breadcrumb">
      <li class="active">角色模板管理</li>
    </ol>
    
    <div class="ms-content-layout">
      <table class="table table-hover ms-table">
          <thead>
            <tr>
              <th>名称</th>
              <th>描述</th>
              <th>详情</th>
            </tr>
          </thead>
          <tbody>
            <c:forEach items="${roleTemplates}" var="template">
               <tr>
                 <td>${template.name}</td>
                 <td>${template.description} </td>
                 <td><a href="${ctx.host}/role-templates/${template.ordinal}">详情</a></td>
               </tr>
             </c:forEach>
         </tbody>
      </table>
    </div> 
    
  </div>

  <%@ include file="/WEB-INF/include/script.jsp"%>
  
</body>
</html>